<!-- 全局自定义弹窗 -->
<template>
	<view class="cu-load load-modal" v-if="modalName == tag">
		<!-- <view class="cuIcon-emojifill text-orange"></view> -->
		<image src="https://h5.qianmabo.com/icon/icon_loading.gif" mode="aspectFit"></image>
		<view class="gray-text">{{content}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		name: 'cu-modal',
		computed: {
			style() {
				var style = '';
				return style;
			}
		},
		props: {
			tag: { //对应标记
				type: String,
				default: 'loading'
			},
			modalName: { //显示标记，如果show==tag即显示该dialog
				type: String,
				default: null
			},
			content: { //显示标记,center 居中,bottom 底部
				type: String,
				default: '加载中...'
			}
		},
	
		created() {

		},
		methods: {
			showModal(e) {
				this.modalName = e.currentTarget.dataset.target;
			},
			onHideModal(e) {
				this.$emit('onHideModal', e);
			}
		}
	};
</script>

<style scoped lang="scss">
	.cu-modal.bottom-modal .cu-dialog {
		border-top-left-radius: 24upx;
		border-top-right-radius: 24upx;
	}

	.cu-dialog-none {
		background: none;
	}
</style>
